package com.twu.util;

import java.util.List;

public class OptionsUtil
{

	public static boolean isInRange(int optionNumber, int size)
	{
		return optionNumber > 0 && optionNumber <= size;
	}

	public static String formattedOutput(List menuOptions)
	{
		int i = 0;
		StringBuilder stringBuilder = new StringBuilder();
		for (Object option : menuOptions)
		{
			stringBuilder.append(++i).append(".").append(option.toString()).append("\n");
		}

		return stringBuilder.toString();
	}

}
